package net.neptech.model.sys;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.*;
import lombok.Data;
import net.neptech.utils.SnowflakeIdGenerator;
import org.hibernate.annotations.GenericGenerator;

import java.io.Serial;
import java.io.Serializable;
/**
 * @Author Saya
 * @Date 2025/8/12 16:05
 * @Description TODO
 **/
@Entity
@Table(name = "sys_patient", schema = "med_sys_db")
@Data
@TableName("sys_patient")
public class Patient implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @Id
    @GenericGenerator(name = "snowflake", type = SnowflakeIdGenerator.class)
    @GeneratedValue(generator = "snowflake")
    @Column(name = "patient_id", nullable = false, columnDefinition = "int COMMENT '就诊人ID'")
    @TableId
    public Long patientId;

    @Column(name = "patient_name", columnDefinition = "varchar(255) COMMENT '就诊人姓名'")
    public String patientName;

    @Column(name = "patient_gender", columnDefinition = "int COMMENT '就诊人性别0男1女 2未知'")
    public Integer patientGender;

    @Column(name = "patient_birth", columnDefinition = "varchar(255) COMMENT '出生日期'")
    public String patientBirth;

    @Column(name = "patient_contact", columnDefinition = "varchar(255) COMMENT '联系方式'")
    public String patientContact;

    @Column(name = "address_id", columnDefinition = "int")
    public Long addressId;
}
